<?php

namespace App\Http\Controllers;

use App\Services\BannerService;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

class BannerController extends Controller
{
    /**
     * Banner列表
     * @param Request $request
     * @return JsonResponse
     */
    public function list(Request $request)
    {
        $bannerType = $request->input('banner_type', 0);
        $data = BannerService::getInstance()->list(3, $bannerType);
        return $this->success($data);
    }
}
